<template>
    <div>
        <el-progress :percentage="type" :color="customColor"></el-progress>

        <el-progress :percentage="type" :color="customColorMethod"></el-progress>

        <el-progress :percentage="type" :color="customColors"></el-progress>
    </div>
</template>
<script>
export default {
    //自定义属性 由父组件传入的值
    props:['type'],
    data() {
      return {
       // percentage: 20,//变量 同时 是父组件传进来的值
        customColor: '#409eff',
        customColors: [
          {color: '#f56c6c', percentage: 20},
          {color: '#e6a23c', percentage: 40},
          {color: '#5cb87a', percentage: 60},
          {color: '#1989fa', percentage: 80},
          {color: '#6f7ad3', percentage: 100}
        ]
      };
    },
}
</script>